
	<div class="dialog_title">
	    <a class="dialog_x">X</a>
	    <h1 id="dialog_expenses_title">Add Expenses To Report</h1>
	</div>
	
	<div class="dialog_wrapper">
	<div id="expenses_sideNav" class="section floatLeft">
       <form id="filter" class="form">
             <fieldset>
                        <legend>Filters</legend>
                        <ol>

                            <li>
                                <ol>
                                    <li>
                                        <label class="dateField">From</label>
                                        <input value="<?php echo date("Y-m-d",strtotime("-1 year"));?>" id="startDate" name="startDate"
                                               class="required calendar semwal_dtpicker" type="text">
                                    </li>
                                    <li>
                                        <label class="dateField">To</label>
                                        <input value="<?php echo date('Y-m-d',time());?>" id="endDate" name="endDate"
                                               class="required calendar semwal_dtpicker" type="text">
                                    </li>
                                </ol>
                            </li>
                            <li>
                                <ul id="expense_filter_billable_claimCustomer" class="segmented-control">
                                    <li id="expense_filter_billable_claimCustomer_All" class="actived">All</li>
                                    <li id="expense_filter_billable_claimCustomer_Billable">Billable</li>
                                    <li id="expense_filter_billable_claimCustomer_ClaimCustomer">Claim Customer</li>
                                    
                                </ul>
                                <input type="hidden" name="expense_status"  id="expense_status" value="All">
                            </li>
                            <li>
                                <select name="expense_filter_type" id="expense_filter_type" class="qtip">                  
                                    <option value="unreported">Unreported expenses</option>
                                    <option value="reported">Reported expenses</option>
                                    <option value="unsubmitted">Unsubmitted expenses</option>
                                    <option value="submitted">Submitted expenses</option>
                                    <option value="deleted">Deleted expenses</option>
                                </select>
                            </li>

                            <li>
                                <select name="expense_filter_categories" id="expense_filter_categories">
                                    <option selected="selected" value="-1">All categories</option>
                                    <?php foreach ($categories as $category): ?>
                                    <option value="<?php echo $category['Id'];?>"><?php echo $category['CategoryName'];?></option>  
                                    <?php endforeach;?>                           
                                </select>
                            </li>
                            <?php if(isset(Yii::app()->user->isSuperAdmin) && Yii::app()->user->isSuperAdmin):?>
                            <li>
                                <select class="qtip" id="expense_filter_customers" name="expense_filter_customers">
                                    <option value="-1" selected="selected">All Customer</option>
                                    <?php foreach ($customers as $customer):?>
                                    <option value="<?php echo $customer['Id']?>"><?php echo $customer['CustomerName']?></option>
                                    <?php endforeach;?>
                                </select>
                            </li>
                            <li>
                                <select class="qtip" id="expense_filter_users" name="expense_filter_users">
                                    <option value="-1" selected="selected">All Employee</option>
                                    <?php foreach ($users as $user): ?>
                                    <option value="<?php echo $user['Id'];?>"><?php echo $user['FullName'];?></option>
                                    <?php endforeach;?>
                                </select>
                            </li>
                            <?php endif;?>
                        </ol>
                        <input type="hidden" value="1" name="expense_page" id="expense_page">
                    </fieldset>
                         <br/>
                       <div class="clear"></div>
		<div class="section">
		<div class="button">
		<a id="btn_search">Search</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#" class="reset" id="btn_reset">Reset</a></div>
		<img src="/expense/images/spinner_2x.gif" alt="uploading" id="search_spinner" class="hide">
		<div class="message_hint hidden" id="filer_check_message">
		<p> To Date must to be greater than From Date</p>
		</div>
		</div>
        </form>
</div>

            <div id="dialog_expenses_expensestable">
    <div id="editheader">
        <div class="buttons_container hidden" id="actions" style="display: block;">
        
            <div class="floatWrapper">
                <div id="report_actions" class="buttons_container floatLeft">
    <!-- Report Actions -->
    <div class="button add qtip" id="addreport_button"><a>Add to Report</a></div>
    <div class="button delete qtip" id="removereport_button" style="display: none;"><a>Remove from Report</a></div>
    <div class="floatLeft" id="report_selector_container" style="display: none;">
        <div class="floatLeft qtip hidden" id="report_selector_div">
            <select class="reportSelector" id="report_selector"></select>
        </div>
        <div class="button qtip hidden" id="view_report"><a>View Report</a></div>
        <div class="button add qtip hidden" id="new_report"><a>Add to New Report</a></div>
    </div>
</div>
                
                <div id="other_actions" class="floatLeft buttons_container marginBottom">
                    <!-- Action Buttons -->
                    <div class="button add qtip" id="createexpense_button"><a>New Expense</a></div>
                    <div class="button qtip" id="editMultiple_button"><a>Edit Multiple</a></div>
                    <div class="button qtip" id="expenses_export_button" style="display: none;"><a>Export to...</a></div>
                    <div class="button delete qtip" id="delete_expense"><a class="iconButton" id="expenses_deletebutton1"></a></div>
                </div>
            </div>
        </div>
    </div>
    <div id="tablecontainer">
    <?php $this->renderPartial('application.views.expenses.search',array(
		'rows'=>$rows,
		'page'=>$page,
		'limit'=>$limit,
		'totalItem'=>$totalItem,
        'currencies'=>$currencies

		));?>
    </div>
    <div id="chartcontainer" style="display: none;"></div>

    <div style="display:none;" class="message_empty" id="chart-empty">
        There are no expenses for the current filter settings
    </div>
    <div id="charttablecontainer" style="display: none;"></div>
</div>

	</div>